<?php
class Lawyer extends Controller{
    public function  __construct() {
        parent::Controller();
        $this->load->model('lawyermodel','lawyer');
        $this->load->model('photomodel','photo');
        $this->load->model('contactmodel','contact');
    }

    public function show(){
        $id = intval(isset($_GET['id'])?$_GET['id']:0);
        if($lawyer = $this->lawyer->find($id)){
            $data['lawyer'] = $lawyer;
			$data['contact'] = $this->contact->find();
            $data['advisers'] = $this->db->get('adviser')->result();
            $this->load->view('lawyer_show',$data);
        }else{
            show_404();
        }
    }
}